<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

        /* 基于 flex 布局来实现横向布局
        使用 width: 20% 可以设置某个元素的宽度是父元素的 20%. */

        .parent{
            width: 500px;
        }
        .top{
            height: 35px;
            color: white;
            background-color: rgb(168, 198, 209);
            text-align: center;
        }
        .body{
            display: flex;
            /* 水平 */
            justify-content: space-between;
            /* 垂直方向 */
            /* align-items: center; */
        }
        .left,.right{
            width: 20%;
            background-color:  rgb(147, 176, 154);
            text-align: center;
            color: white;
            line-height: 200px;
        }
        .middle{
            width: 60%;
            background-color: rgb(244, 229, 170);
            text-align: center;
            color: white;
            line-height: 200px;
        }

        .bottom{
            height: 50px;
            background-color: rgb(175, 200, 117);
            text-align: center;
            color: white;
            line-height: 50px;
        }
    </style>
</head>
<body>
    
    <div class="parent">
        <div class="top">
            我是导航栏
        </div>
        <div class="body">
            <div class="left">我是左边栏</div>
            <div class="middle">我是内容区</div>
            <div class="right">我是右边栏</div>
        </div>
        <div class="bottom">
            我是底部栏
        </div>
    </div>
</body>
</html>